package com.eclipse.e0112_io.序列化和反序列化;

import java.io.FileOutputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class Test1 {
	public static void main(String[] args) throws Exception {
		Student s1 = new Student();
		s1.name = "s1";
		//写
		ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("/Users/liuzhuangzhuang/Desktop/io/xuliehua.data"));
		oos.writeObject(s1);
		oos.close();
		
	}
}
class Student implements Serializable {
	private static final long serialVersionUID = 1L;
	String name;
	void shuchu(){
		System.out.println("123");
	}
}
